# -*- coding: utf-8 -*-
""" Compomer Factory class
"""

__author__ = """Alexander Artyomenko (artyomenkoav@gmail.com)"""
#   Copyright (C) 2011-2012 by
#   Alex Artyomenko <artyomenkoav@gmail.com>
#   All rights reserved.
#   BSD license.

class Compomer:
    """ Class for compomer representation     
    """
    real_mass = 0
    compomers = []
    def __init__(self, real_mass, compomers):
        self.real_mass = real_mass
        self.compomers = compomers
        
    
    def __repr__(self):
        if len(self.compomers):
            return "{0}\n".format(reduce(lambda x, y : "{}{}".format(x, y), \
                    map(lambda x : str(x), self.compomers)))
        return "\n"
